package com.jhopesoft.framework.dao.entity.favorite;
// default package
// Generated 2017-8-28 10:25:44 by Hibernate Tools 5.2.0.Beta1


import java.util.Map;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import com.alibaba.fastjson.annotation.JSONField;
import com.jhopesoft.framework.dao.entity.dataobject.FDataobject;
import com.jhopesoft.framework.dao.entity.system.FUser;
import com.jhopesoft.framework.dao.entity.viewsetting.FovHomepagescheme;
import com.jhopesoft.framework.utils.CommonUtils;

/**
 * FUserobjectfavorite generated by hbm2java
 */
@SuppressWarnings("serial")
@Entity
@DynamicUpdate
@Table(name = "f_userobjectfavorite")
public class FUserobjectfavorite implements java.io.Serializable {


  private String favoriteid;
  private FDataobject FDataobject;
  private FovHomepagescheme fovHomepagescheme;
  private FUser FUser;
  private Integer orderno;
  private Boolean isdatamining = false;
  private Boolean hasfavorite;
  private String modulesetting;
  private String gridsetting;
  private String formsetting;
  private String approvesetting;
  private String dataminingsetting;
  private Boolean isuserdefault;

  public FUserobjectfavorite() {}


  public FUserobjectfavorite(String favoriteid) {
    this.favoriteid = favoriteid;
  }

  public FUserobjectfavorite(FDataobject FDataobject, FUser FUser) {
    this.FDataobject = FDataobject;
    this.FUser = FUser;
  }

  public FUserobjectfavorite(FovHomepagescheme fovHomepagescheme, FUser FUser) {
    this.fovHomepagescheme = fovHomepagescheme;
    this.FUser = FUser;
  }

  @Id
  @GeneratedValue(generator = "generator")
  @GenericGenerator(name = "generator", strategy = "uuid.hex")
  @Column(name = "favoriteid", unique = true, nullable = false, length = 40)
  public String getFavoriteid() {
    return this.favoriteid;
  }

  public void setFavoriteid(String favoriteid) {
    this.favoriteid = favoriteid;
  }

  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "objectid")
  @JSONField(serialize = false)
  public FDataobject getFDataobject() {
    return this.FDataobject;
  }

  public void setFDataobject(FDataobject FDataobject) {
    this.FDataobject = FDataobject;
  }


  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "homepageschemeid")
  @JSONField(serialize = false)
  public FovHomepagescheme getFovHomepagescheme() {
    return fovHomepagescheme;
  }

  public void setFovHomepagescheme(FovHomepagescheme fovHomepagescheme) {
    this.fovHomepagescheme = fovHomepagescheme;
  }


  @ManyToOne(fetch = FetchType.LAZY)
  @JoinColumn(name = "userid")
  @JSONField(serialize = false)
  public FUser getFUser() {
    return this.FUser;
  }

  public void setFUser(FUser FUser) {
    this.FUser = FUser;
  }

  public Integer getOrderno() {
    return orderno;
  }

  public void setOrderno(Integer orderno) {
    this.orderno = orderno;
  }

  public Boolean getIsdatamining() {
    return isdatamining;
  }

  public void setIsdatamining(Boolean isdatamining) {
    this.isdatamining = isdatamining;
  }

  @Column(name = "hasfavorite")
  public Boolean getHasfavorite() {
    return this.hasfavorite;
  }

  public void setHasfavorite(Boolean hasfavorite) {
    this.hasfavorite = hasfavorite;
  }

  @Column(name = "modulesetting", length = 65535)
  public String getModulesetting() {
    return this.modulesetting;
  }

  public void setModulesetting(String modulesetting) {
    this.modulesetting = modulesetting;
  }

  @Transient
  public Map<String, Map<String, Object>> getModuleSetting() {
    return CommonUtils.changeModulePropertiesStringToMap(this);
  }

  @Column(name = "gridsetting", length = 65535)
  public String getGridsetting() {
    return this.gridsetting;
  }

  public void setGridsetting(String gridsetting) {
    this.gridsetting = gridsetting;
  }

  @Transient
  public Map<String, Map<String, Object>> getFormSetting() {
    return CommonUtils.changeFormPropertiesStringToMap(this);
  }

  @Column(name = "formsetting", length = 65535)
  public String getFormsetting() {
    return this.formsetting;
  }

  public void setFormsetting(String formsetting) {
    this.formsetting = formsetting;
  }


  @Column(name = "approvesetting", length = 65535)
  public String getApprovesetting() {
    return this.approvesetting;
  }

  public void setApprovesetting(String approvesetting) {
    this.approvesetting = approvesetting;
  }

  @Transient
  public Map<String, Map<String, Object>> getDataminingSetting() {
    return CommonUtils.changeDataminingPropertiesStringToMap(this);
  }

  @Column(name = "dataminingsetting", length = 65535)
  public String getDataminingsetting() {
    return this.dataminingsetting;
  }

  public void setDataminingsetting(String dataminingsetting) {
    this.dataminingsetting = dataminingsetting;
  }

  public Boolean getIsuserdefault() {
    return isuserdefault;
  }

  public void setIsuserdefault(Boolean isuserdefault) {
    this.isuserdefault = isuserdefault;
  }

}


